from django.contrib import admin

from home.models import NavCategory, Banner


# Register your models here.


@admin.register(NavCategory)
class NavCategoryAdmin(admin.ModelAdmin):
    # 显示的字段
    list_display = ('id', 'name', 'weight', 'external_link')
    search_fields = ('name', 'weight')
    list_filter = ('name', 'weight')


@admin.register(Banner)
class BannerAdmin(admin.ModelAdmin):
    list_display = ('id', 'title', 'image', 'link', 'note')

